Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
filter3(cons1(X), 0, M) -> cons1(0)
filter3(cons1(X), s1(N), M) -> cons1(X)
sieve1(cons1(0)) -> cons1(0)
sieve1(cons1(s1(N))) -> cons1(s1(N))
nats1(N) -> cons1(N)
zprimes -> sieve1(nats1(s1(s1(0))))
Q is empty.
↳ QTRS
↳ Non-Overlap Check
Q restricted rewrite system:
The TRS R consists of the following rules:
filter3(cons1(X), 0, M) -> cons1(0)
filter3(cons1(X), s1(N), M) -> cons1(X)
sieve1(cons1(0)) -> cons1(0)
sieve1(cons1(s1(N))) -> cons1(s1(N))
nats1(N) -> cons1(N)
zprimes -> sieve1(nats1(s1(s1(0))))
Q is empty.
The TRS is non-overlapping. Hence, we can switch to innermost.
↳ QTRS
↳ Non-Overlap Check
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
filter3(cons1(X), 0, M) -> cons1(0)
filter3(cons1(X), s1(N), M) -> cons1(X)
sieve1(cons1(0)) -> cons1(0)
sieve1(cons1(s1(N))) -> cons1(s1(N))
nats1(N) -> cons1(N)
zprimes -> sieve1(nats1(s1(s1(0))))
The set Q consists of the following terms:
filter3(cons1(x0), 0, x1)
filter3(cons1(x0), s1(x1), x2)
sieve1(cons1(0))
sieve1(cons1(s1(x0)))
nats1(x0)
zprimes
Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
ZPRIMES -> SIEVE1(nats1(s1(s1(0))))
ZPRIMES -> NATS1(s1(s1(0)))
The TRS R consists of the following rules:
filter3(cons1(X), 0, M) -> cons1(0)
filter3(cons1(X), s1(N), M) -> cons1(X)
sieve1(cons1(0)) -> cons1(0)
sieve1(cons1(s1(N))) -> cons1(s1(N))
nats1(N) -> cons1(N)
zprimes -> sieve1(nats1(s1(s1(0))))
The set Q consists of the following terms:
filter3(cons1(x0), 0, x1)
filter3(cons1(x0), s1(x1), x2)
sieve1(cons1(0))
sieve1(cons1(s1(x0)))
nats1(x0)
zprimes
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ Non-Overlap Check
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
ZPRIMES -> SIEVE1(nats1(s1(s1(0))))
ZPRIMES -> NATS1(s1(s1(0)))
The TRS R consists of the following rules:
filter3(cons1(X), 0, M) -> cons1(0)
filter3(cons1(X), s1(N), M) -> cons1(X)
sieve1(cons1(0)) -> cons1(0)
sieve1(cons1(s1(N))) -> cons1(s1(N))
nats1(N) -> cons1(N)
zprimes -> sieve1(nats1(s1(s1(0))))
The set Q consists of the following terms:
filter3(cons1(x0), 0, x1)
filter3(cons1(x0), s1(x1), x2)
sieve1(cons1(0))
sieve1(cons1(s1(x0)))
nats1(x0)
zprimes
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 2 less nodes.